Hello Everyone, |
Re: skip list You can put an "Object" handle into a skip list yes. Consider the following that prints the objects in absolute number order:
Skip skpObjects = create // KEY: 'int' AbsNo; DATA: 'Object' Handle
int AbsNo
Object obj
for obj in entire (current Module) do
{ AbsNo = obj."Absolute Number"
put (skpObjects, AbsNo, obj)
}
for obj in skpObjects do
{ AbsNo = (int key skpObjects)
print AbsNo "\t" number(obj) "\t" obj."MyTestAttr" "\n"
}
delete(skpObjects)
|
Re: skip list llandale - Mon Mar 28 14:52:42 EDT 2011 You can put an "Object" handle into a skip list yes. Consider the following that prints the objects in absolute number order:
Skip skpObjects = create // KEY: 'int' AbsNo; DATA: 'Object' Handle
int AbsNo
Object obj
for obj in entire (current Module) do
{ AbsNo = obj."Absolute Number"
put (skpObjects, AbsNo, obj)
}
for obj in skpObjects do
{ AbsNo = (int key skpObjects)
print AbsNo "\t" number(obj) "\t" obj."MyTestAttr" "\n"
}
delete(skpObjects)
Hi Louie,
Object o
Skip uniqueIDs = createString()
filtering off
string objIdentifier = null
int count = 0
for o in current Module do
{
objIdentifier = identifier o
if(put(uniqueIDs, objIdentifier, 1) == false)
{
find(uniqueIDs, objIdentifier, count)
count++
delete(uniqueIDs, objIdentifier)
put(uniqueIDs, objIdentifier, count)
}
}
for count in uniqueIDs do
{
if(count > 1)
{
// must cast the key command.
objIdentifier = (string key uniqueIDs)
print "Found " (count) " objects with Identifier " objIdentifier ".\n"
}
}
delete uniqueIDs
|
Re: skip list llandale - Mon Mar 28 14:52:42 EDT 2011 You can put an "Object" handle into a skip list yes. Consider the following that prints the objects in absolute number order:
Skip skpObjects = create // KEY: 'int' AbsNo; DATA: 'Object' Handle
int AbsNo
Object obj
for obj in entire (current Module) do
{ AbsNo = obj."Absolute Number"
put (skpObjects, AbsNo, obj)
}
for obj in skpObjects do
{ AbsNo = (int key skpObjects)
print AbsNo "\t" number(obj) "\t" obj."MyTestAttr" "\n"
}
delete(skpObjects)
Thanks |
Re: skip list bullbala - Tue Mar 29 02:06:20 EDT 2011
Hi Louie,
Object o
Skip uniqueIDs = createString()
filtering off
string objIdentifier = null
int count = 0
for o in current Module do
{
objIdentifier = identifier o
if(put(uniqueIDs, objIdentifier, 1) == false)
{
find(uniqueIDs, objIdentifier, count)
count++
delete(uniqueIDs, objIdentifier)
put(uniqueIDs, objIdentifier, count)
}
}
for count in uniqueIDs do
{
if(count > 1)
{
// must cast the key command.
objIdentifier = (string key uniqueIDs)
print "Found " (count) " objects with Identifier " objIdentifier ".\n"
}
}
delete uniqueIDs
First off, every <identifier(o)> in your module is in fact different so your script as written will NEVER survive your first <if> statement and count will never be incremented. OK, without module corruption.
Found 3 objects with ProcedureNumber 'ABC001':
MyMod_32 3.2.1-0.2
MyMod_455 3.5.1-0.1
MyMod_129 3.5.1.5-0.4
|
Re: skip list llandale - Tue Mar 29 16:21:16 EDT 2011
First off, every <identifier(o)> in your module is in fact different so your script as written will NEVER survive your first <if> statement and count will never be incremented. OK, without module corruption.
Found 3 objects with ProcedureNumber 'ABC001':
MyMod_32 3.2.1-0.2
MyMod_455 3.5.1-0.1
MyMod_129 3.5.1.5-0.4
Merci ! |
Re: skip list bullbala - Wed Mar 30 02:45:45 EDT 2011 Are you a frenchie? |